function h=sector(Q,theta,r,a)
%returns a handle of a sector centered at Q heading theta with radius r and angle a
w1=theta-a/2;w2=theta+a/2;
w=[w1:pi/30:w2]';
tmp=[Q(1)+r*cos(w),Q(2)+r*sin(w)];
if a<pi*2,
  xy=[[Q(1),Q(2)];tmp;[Q(1),Q(2)]];
else,
  xy=tmp;
end;
h=line(xy(:,1),xy(:,2));
return;

